﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LearnPay
{
    /// <summary>
    /// 支付工具类
    /// 支付宝支付文档：https://openhome.alipay.com/developmentDocument.htm
    /// 微信支付文档：https://pay.weixin.qq.com/wiki/doc/api/index.html
    /// 银联支付文档：https://open.unionpay.com/ajweb/product
    /// </summary>
    public class PaymentHelper
    {
        static PaymentHelper() { }

        /// <summary>
        /// 支付
        /// </summary>
        /// <param name="model">支付信息</param>
        /// <returns></returns>
        public static FuncResult Pay(PaymentModel model)
        {
            if (model == null)
                return FuncResult.FailResult("支付信息为空！");
            switch (model.PaymentType)
            {
                case PaymentType.Balance:
                    break;
                case PaymentType.Alipay:
                    break;
                case PaymentType.Wechatpay:
                    break;
                case PaymentType.Unionpay:
                    break;
                default:
                    return FuncResult.FailResult("支付方式不存在！");
            }
            return FuncResult.SuccessResult();
        }
    }
}
